package com.sj.dynamicProxy;

public class Proxy {

    //用来产生新的代理类
    public static Object newProxyInstance() {
        String src = "package com.sj.dynamicProxy;" +
                "public class TankTimeProxy implements IMoveable {" +
                "private IMoveable t;" +

                "public TankTimeProxy(IMoveable t) {" +
                "super();" +
                "this.t = t;" +
                "}" +

                "public void move() {" +
                "long start = System.currentTimeMillis();" +
                "System.out.println(\"starttime: \" + start);" +
                "t.move();" +
                "long end = System.currentTimeMillis();" +
                "System.out.println(\"time: \" + (end - start));" +
                "}" +
                "}";

        return null;
    }
}
